# code:utf8


# 常用链接
from scrapy import Request

search_url = 'http://210.76.73.186/search.html?combo=0_0_0_0_0_0&k={}&page={}&per_page=100&utf8=%E2%9C%93'


def build_search_req(sku_name, page, callback, errback):
    # 采集商品关联关系
    yield Request(
        url=search_url.format(sku_name, page),
        meta={
            'reqType': 'item',
            'batchNo': self.batch_no,
            'skuId': sku_id,
            'spuId': spu_id,
            'spId': sp_id,
            'skuName': sku_name,
        },
        callback=callback,
        errback=errback,

    )
